{% extends "base.html" %}

{% block title %}注册{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-8">
        <div class="card">
            <div class="card-header">
                <h4 class="mb-0">用户注册</h4>
            </div>
            <div class="card-body">
                <form method="post">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="mb-3">
                                <label for="username" class="form-label">用户名</label>
                                <input type="text" class="form-control" id="username" name="username" required>
                            </div>
                            <div class="mb-3">
                                <label for="email" class="form-label">电子邮箱</label>
                                <input type="email" class="form-control" id="email" name="email" required>
                            </div>
                            <div class="mb-3">
                                <label for="password" class="form-label">密码</label>
                                <input type="password" class="form-control" id="password" name="password" required>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="mb-3">
                                <label for="full_name" class="form-label">姓名</label>
                                <input type="text" class="form-control" id="full_name" name="full_name" required>
                            </div>
                            <div class="mb-3">
                                <label for="phone" class="form-label">联系电话</label>
                                <input type="tel" class="form-control" id="phone" name="phone" required>
                            </div>
                            <div class="mb-3">
                                <label for="role" class="form-label">用户角色</label>
                                <select class="form-select" id="role" name="role" required>
                                    <option value="">请选择角色</option>
                                    <option value="engineer">测控工程师</option>
                                    <option value="manager">项目管理人员</option>
                                    <option value="integrator">系统集成商</option>
                                </select>
                            </div>
                            <div class="mb-3">
                                <label for="department" class="form-label">所属部门</label>
                                <input type="text" class="form-control" id="department" name="department" required>
                            </div>
                        </div>
                    </div>
                    <div class="text-center">
                        <button type="submit" class="btn btn-primary">注册</button>
                        <a href="{{ url_for('auth.login') }}" class="btn btn-link">已有账号？去登录</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %} 